﻿using Newtonsoft.Json.Linq;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static CloudApiServer.Controllers.FsiApiZheJiangController;
using static log4net.Appender.RollingFileAppender;

namespace CloudApiServer
{
    /// <summary>
    /// 浙江省其他接口返回参数头
    /// </summary>
    public class FsiHsaImsSvcHeader<TResult>
    {
        /// <summary>
        /// 状态码 0：成功，其他：失败
        /// </summary>
        public int code { get; set; }
        /// <summary>
        /// 类型
        /// </summary>
        public string type { get; set; }
        /// <summary>
        /// 消息
        /// </summary>
        public string message { get; set; }
        /// <summary>
        /// 返回数据
        /// </summary>
        public TResult data { get; set; }
    }

    /// <summary>
    /// ZJ3100 购药明细查询接口Data节点
    /// </summary>
    public class FsiHsaImsSvcOuputQueryDrugdosageData
    {
        /// <summary>
        /// 总条数
        /// </summary>
        public int total { get; set; }
        /// <summary>
        /// 用药记录返回ListHiListRecodeDTO
        /// </summary>
        public List<FsiHsaImsSvcOuputQueryDrugdosageDataList> lists { get; set; }
        /// <summary>
        /// 页容
        /// </summary>
        public int pageSize { get; set; }
        /// <summary>
        /// 页码
        /// </summary>
        public int currentPage { get; set; }
        /// <summary>
        /// 参保人编码
        /// </summary>
        public string psnNo { get; set; }
        /// <summary>
        /// 参保人姓名
        /// </summary>
        public string psnName { get; set; }
    }
    /// <summary>
    /// ZJ3100 购药明细查询接口DataList节点
    /// </summary>
    public class FsiHsaImsSvcOuputQueryDrugdosageDataList
    {
        /// <summary>
        /// 单据编号
        /// </summary>
        public string mdtrtId { get; set; }
        /// <summary>
        /// 费用日期
        /// </summary>
        public string feeOcurTime { get; set; }
        /// <summary>
        /// 项目编码
        /// </summary>
        public string hilistCode { get; set; }
        /// <summary>
        /// 项目名称
        /// </summary>
        public string hiListName { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public decimal cnt { get; set; }
        /// <summary>
        /// 剂型
        /// </summary>
        public string dosformName { get; set; } 
        /// <summary>
        /// 使用频次描述
        /// </summary>
        public string usedFrquDscr { get; set; }
        /// <summary>
        /// 单次剂量描述
        /// </summary>
        public string sinDosDscr { get; set; }
        /// <summary>
        /// 顺序号？
        /// </summary>
        public int seq { get; set; }
        /// <summary>
        /// 卡号 身份证号
        /// </summary>
        public string certno { get;set; }
        /// <summary>
        /// 目录类别 101-西药中成药 102-中药饮片 103-自制剂 104-名族药 201-服务项目 301-医用耗材
        /// </summary>
        public string listType { get; set; }
        /// <summary>
        /// 医疗机构内部编码
        /// </summary>
        public string medinsListCodg { get; set; }
        /// <summary>
        /// 医疗机构目录名称
        /// </summary>
        public string medinsListName { get; set; }
        /// <summary>
        /// 医疗机构费用类别 11中成药费 10 中药饮片费 09 西药费 12 一般诊疗费 08 材料费 14 其他费
        /// </summary>
        public string medChrgitmType { get; set; }
        /// <summary>
        /// 收费项目等级 01 甲类 02 乙类 03 丙类 04 可报丙类
        /// </summary>
        public string chrgitmLv { get; set; }
        /// <summary>
        /// 单个价格
        /// </summary>
        public decimal pric { get; set; }
        /// <summary>
        /// 项目费用总额
        /// </summary>
        public decimal detItemFeeSumamt { get; set; }
        /// <summary>
        /// 符合政策范围的项目总额
        /// </summary>
        public decimal inscpAmt { get; set; }
        /// <summary>
        /// 开单科室编码
        /// </summary>
        public string bilgDeptCodg { get; set; }
        /// <summary>
        /// 开单科室名称
        /// </summary>
        public string bilgDeptName { get; set; }
        /// <summary>
        /// 开单医生编码
        /// </summary>
        public string bilgDrCode { get; set; }
        /// <summary>
        /// 开单医师姓名
        /// </summary>
        public string bilgDrName { get; set; }
        /// <summary>
        /// 不知道啥字段
        /// </summary>
        public string autoIncrementSeq { get; set; }
        /// <summary>
        /// 日期
        /// </summary>
        public string ds { get;set; }
    }



    /// <summary>
    /// 处方中心整个报文输出
    /// </summary>
    public class FsiEpcHeader 
    {
        public int code { get; set; }
        public string appId { get; set; }
        public string timestamp { get; set; } 
        public string encType { get; set; } = "SM4";
        public string signType { get; set; } = "SM2";
        public string signData { get; set; }
        public string encData { get; set; }
        public string message { get; set; }
        public string success { get; set; }
        public string type { get; set; }
    }
    /// <summary>
    /// 处方中心失败报文输出
    /// </summary>
    public class FsiEpcErrorHeader
    {
        public int code { get; set; }
        public string message { get; set; }
    }
    public class FsiEpcOutput<TResult>
    {
        public string appId { get; set; }
        public TResult data { get; set; }
        public string encType { get; set; } = "SM4";
        public string signType { get; set; } = "SM2";
        public string timestamp { get; set; }

        public string version { get; set; } = "1.0.0";
        public string key { get; set; } = FsiEpcTokeninfo.appSecret;
    }
    public class FsiEpcDtoOutput<TResult>
    {
        public string appId { get; set; }
        public string encType { get; set; } = "SM4";
        public string signType { get; set; } = "SM2";
        public string timestamp { get; set; }
        public TResult data { get; set; }
    }
    public class FsiEpcOutputList<TResult>
    {
        public string appId { get; set; }
        public List<TResult> data { get; set; }
        public string encType { get; set; } = "SM4";
        public string signType { get; set; } = "SM2";
        public string timestamp { get; set; }
        public string version { get; set; }
        public string key { get; set; } = FsiEpcTokeninfo.appSecret;
    }
    /// <summary>
    /// 处方中心 人工审核出餐
    /// </summary>
    public class FsiEpcAgentReqRxAuthRegOutputData
    {
        public string regSn { get; set; }
        public DateTime datetime { get; set; }
    }

    /// <summary>
    /// 处方中心 处方预核验
    /// </summary>
    public class FsiEpcRxAuthQueryOutputData
    {
        public string authRxno { get; set; }
        public string epcToken { get; set; }
        public string expiresIn { get; set; }
        public string fixmedinsCode { get; set; }
        public string fixmedinsName { get; set; }
        public string prscTime { get; set; }
        public string deptName { get; set; }
        public string diseCodg { get; set; }
        public string diseName { get; set; }
        public string valiEndTime { get; set; }
    }

    /// <summary>
    /// 处方中心 处方下载-主节点
    /// </summary>
    public class FsiEpcRxInfoDldOutputData
    {
        public string hiRxno { get; set; }
        public string rxTraceCode { get; set;}
        public string fixmedinsCode { get; set;}
        public string fixmedinsName { get;set; }
        public string prscTime { get; set;}
        public string prscDeptName { get; set;}
        public string valiEndTime { get;set; }
        public string rxTypeCode { get;set; }
        public string rxTypeName { get; set; } 
        public string longRxFlag { get; set;}
        public string rxFile { get; set;}
        public string fileSuffix { get; set; }
        public List<FsiEpcRxInfoDldOutputRxDetlList>  rxDetlList { get; set; }
        public FsiEpcRxInfoDldOutputRxOtpinfo rxOtpinfo { get;set; }
    }
    /// <summary>
    /// 处方中心 处方下载-药品明细
    /// </summary>
    public class FsiEpcRxInfoDldOutputRxDetlList
    {
        /// <summary>
        /// 
        /// </summary>
        public string medListCodg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string fixmedinsHilistId { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string hospPrepFlag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string rxItemTypeCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string rxItemTypeName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string tcmdrugTypeName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string tcmdrugTypeCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string tcmherbFoote { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mednTypeCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mednTypeName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mainMedcFlag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string urgtFlag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string basMednFlag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string impDrugFlag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string drugProdname { get; set; }
        /// <summary>
        /// 阿莫西林片
        /// </summary>
        public string drugGenname { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string drugDosform { get; set; }
        /// <summary>
        /// 按C16H19N3O5S计0.25g*24片/盒
        /// </summary>
        public string drugSpec { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string prdrName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal drugCnt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string medcWayCodg { get; set; }
        /// <summary>
        /// 口服
        /// </summary>
        public string medcWayDscr { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string medcEndtime { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string medcBegntime { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal medcDays { get; set; }
        /// <summary>
        /// 片
        /// </summary>
        public string drugDosunt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal sinDoscnt { get; set; }
        /// <summary>
        /// 片
        /// </summary>
        public string sinDosunt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string usedFrquCodg { get; set; }
        /// <summary>
        /// 每天一次
        /// </summary>
        public string usedFrquName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string drugTotlcnt { get; set; }
        /// <summary>
        /// 盒
        /// </summary>
        public string drugTotlcntEmp { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string hospApprFlag { get; set; }
    }
    /// <summary>
    /// 处方中心 处方下载-诊断明细
    /// </summary>
    public class FsiEpcRxInfoDldOutputRxOtpinfo
    {
        public string medType { get; set; }
        public string otpIptFlag { get; set;}
        public string patnName { get; set; }
        public  decimal patnAge { get;set; }
        public string patnHgt { get; set;}
        public decimal patnWt { get; set;} 
        public string  gend { get; set;}
        public decimal gesoVal { get; set;}
        public string nwbFlag { get; set; }
        public string nwbAge { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string suckPrdFlag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string algsHis { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string diseCodg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string diseName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string maindiagCode { get; set; }
        /// <summary>
        /// 麻风
        /// </summary>
        public string maindiagName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string diseCondDscr { get; set; }
    }

    /// <summary>
    /// 处方中心 处方核验
    /// </summary>
    public class FsiEpcRxInfoVerifyOutputData
    {
        public bool flag { get; set; }
        public string rxSignVerifySn { get; set; }
        public string signCertSn { get; set; }
        public string signCertDn { get; set; }
    }

    /// <summary>
    /// 处方中心 审核信息上传
    /// </summary>
    public class FsiEpcRxChkUpldOutputData
    {
        public bool flag { get; set; }
        public string rxChkBizSn { get; set; }
    }

    public class FsiEpcRxSelDrugUpldOutputData
    {
        public bool flag { get; set; }
    }
    /// <summary>
    /// 电子凭证
    /// </summary>
    /// <typeparam name="TResult"></typeparam>
    public class FsiEcCodeHeader<TResult>
    {
        /// <summary>
        /// 
        /// </summary>
        public int code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public TResult data { get; set; }
        /// <summary>
        /// 成功
        /// </summary>
        public string message { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string orgId { get; set; }
    }
    /// <summary>
    /// 电子凭证Data
    /// </summary>
    public class DataFsiEcCode
    {
        /// <summary>
        /// 
        /// </summary>
        public string authNo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string birthday { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string chnlId { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string ecIndexNo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string ecQrCode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string ecToken { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string email { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string gender { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string idNo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string idType { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string insuOrg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string nationality { get; set; }
        /// <summary>
        /// 金丽萍
        /// </summary>
        public string userName { get; set; }
    }
    /// <summary>
    /// 医保输出头
    /// </summary>
    /// <typeparam name="TResult"></typeparam>
    public class FsiHeader<TResult>
    {
        /// <summary>
        /// 交易输出
        /// </summary>
        public TResult output { get; set; }
        /// <summary>
        /// 交易状态码
        /// </summary>
        public int infcode { get; set; }
        public string warn_msg { get; set; }
        public object cainfo { get; set; }
        /// <summary>
        /// 错误信息
        /// </summary>
        public string err_msg { get; set; }
        /// <summary>
        /// 接收报文时间
        /// </summary>
        public string refmsg_time { get; set; }
        public string signtype { get; set; }
        /// <summary>
        /// 响应报文时间
        /// </summary>
        public string respond_time { get; set; }
        /// <summary>
        /// 接收方报文ID
        /// </summary>
        public string inf_refmsgid { get; set; }

        public string enctype { get; set; }
    }
    /// <summary>
    ///医保输出头 安徽
    /// </summary>
    /// <typeparam name="TResult"></typeparam>
    public class FsiAnHuiHeader<TResult>
    {
        public int code { get; set; }
        public int csbCode { get; set; }
        public string message {  get; set; }
        public string requestId { get; set; }
        public List<AanhuiStateList> state { get; set; }
        public FsiHeader<TResult> body { get;set; }
    }

    public class AanhuiStateList
    {

    }


    /// <summary>
    /// 明细审核事前 事中分析输出
    /// </summary>
    public class OutputriskConService
    {
        public List<DatariskConServiceresult> result { get; set; }
    }


    public class DatariskConServiceresult
    {
        /// <summary>
        /// 
        /// </summary>
        public List<Judge_result_detail_dtosItem> judge_result_detail_dtos { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string rule_id { get; set; }
        /// <summary>
        /// 本品用于清热除湿，益气化瘀。用于湿热瘀阻所致的带下病、腹痛，症见带下量多、色黄质稠、臭秽，小腹疼痛，腰骶酸痛，神疲乏力；慢性盆腔炎、子宫内膜炎、慢性宫颈炎见上述证候者。规格:
        /// </summary>
        public string vola_evid { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mdtrt_id { get; set; }
        /// <summary>
        /// 单次就诊性别用药禁忌_事中
        /// </summary>
        public string rule_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string vola_amt_stas { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string jr_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string patn_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string sev_deg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int vola_amt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string vola_bhvr_type { get; set; }
        /// <summary>
        /// [妇科千金片/]为女性使用药物，参保人当前信息显示性别为：男
        /// </summary>
        public string vola_cont { get; set; }
    }

    public class Judge_result_detail_dtosItem
    {
        /// <summary>
        /// 
        /// </summary>
        public string vola_item_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mdtrt_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string jrd_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string patn_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string rx_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal vola_amt { get; set; }

        public static implicit operator List<object>(Judge_result_detail_dtosItem v)
        {
            throw new NotImplementedException();
        }
    }



    /// <summary>
    /// 异地对账1812 Data
    /// </summary>
    public class DataTransBeginMedicine1812
    {
        /// <summary>
        /// 
        /// </summary>
        public string fixmedinsNo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string insuplcAdmdvs { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int loclDataVer { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mdtrtSeq { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int mdtrtSetlTime { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mdtrtareaAdmdvs { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string medType { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double medfeeSumamt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double optinsPaySumamt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double psnCashpay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string psnNo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string recerMsgId { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string senderMsgId { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string setlSn { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string trnsType { get; set; }
    }
    /// <summary>
    /// 异地对账1812 Output
    /// </summary>
    public class OutputTransBeginMedicine1812
    {
        /// <summary>
        /// 
        /// </summary>
        public List<DataTransBeginMedicine1812> data { get; set; }
    }
    /// <summary>
    /// 异地对账1505 Data
    /// </summary>
    public class DataTransBeginMedicine1505
    {
        /// <summary>
        /// 
        /// </summary>
        public string fixmedinsNo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string insuplcAdmdvs { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mdtrtSeq { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mdtrtareaAdmdvs { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string prmmsg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string psnNo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string setlSn { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string succFlag { get; set; }
    }
    /// <summary>
    /// 异地对账1505 Output
    /// </summary>
    public class OutputTransBeginMedicine1505
    {
        /// <summary>
        /// 
        /// </summary>
        public List<DataTransBeginMedicine1505> data { get; set; }
    }

    /// <summary>
    /// 结算退款基金分项拓展字段
    /// </summary>
    public class setl_proc_info
    {
        public double hifpPayInscp { get; set; }
        public string polItemCode { get;set; }
        public double poolPropSelfpay { get; set; }
        public double hifpPay { get; set; }
    }
    /// <summary>
    /// 结算基金支付分项涂总喊
    /// </summary>
    public class Setlinfoexpcontent 
    { 
        public double clcYearAcctPay { get; set; }
        public double Q0001 { get;set; }
        public double crtYearAcctPay { get; set; }
    }
    public class outputsignInOut
    {
        public signInOut signinoutb { get; set; }
    }

    public class outputsignInOutShandong
    {
        public signInOut result { get; set; }
    }
    public class signInOut
    {
        public string sign_no { get; set; }
        public string sign_time { get; set; }
    }
    public class outputQueryPsnInfo
    {
        /// <summary>
        /// 
        /// </summary>
        public List<Idetinfo> idetinfo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public Baseinfo baseinfo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<Insuinfo> insuinfo { get; set; }
    }
    public class Idetinfo
    {
        public string psn_idet_type { get; set; }
        public string psn_type_lv { get; set; } 
        public string memo {  get; set; }   
        public string begntime { get; set; }
        public string endtime { get; set; }
    }

    public class Baseinfo
    {
        /// <summary>
        /// 
        /// </summary>
        public string certno { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string psn_no { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string gend { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string exp_content { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string brdy { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string naty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string psn_cert_type { get; set; }
        /// <summary>
        /// 孔立昊
        /// </summary>
        public string psn_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double age { get; set; }
    }
    public class Insuinfo
    {
        /// <summary>
        /// 
        /// </summary>
        public string insuplc_admdvs { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string psn_insu_date { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string cvlserv_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double balc { get; set; }
        /// <summary>
        /// 浙江华民软件有限公司
        /// </summary>
        public string emp_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string psn_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string psn_insu_stas { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string insutype { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string paus_insu_date { get; set; }

        public static implicit operator List<object>(Insuinfo v)
        {
            throw new NotImplementedException();
        }
    }
    /// <summary>
    /// 2101 2102 药店结算输出
    /// </summary>
    public class outputDrugstoreSettleAccountsPreA
    {
        /// <summary>
        /// 
        /// </summary>
        public List<Detlcutinfo> detlcutinfo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public Setlinfo setlinfo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<Setldetail> setldetail { get; set; }
    }
    public class Detlcutinfo
    {
        /// <summary>
        /// 
        /// </summary>
        public string bas_medn_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string med_chrgitm_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal det_item_fee_sumamt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string hi_nego_drug_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int fulamt_ownpay_amt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal cnt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal pric { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string memo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string hosp_part_amt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string feedetl_sn { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal inscp_scp_amt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string drt_reim_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int overlmt_amt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string list_sp_item_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal pric_uplmt_amt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int selfpay_prop { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string chld_medc_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int preselfpay_amt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string chrgitm_lv { get; set; }
    }
    public class Setlinfo
    {
        public string setl_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string setl_time { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double cvlserv_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double hifdm_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string cvlserv_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string med_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string exp_content { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string brdy { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string naty { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double psn_cash_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string certno { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double hifmi_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string psn_no { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double act_pay_dedc { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mdtrt_cert_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double balc { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string medins_setl_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string psn_cert_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double acct_mulaid_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string clr_way { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double hifob_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double oth_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double medfee_sumamt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double hifes_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string gend { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mdtrt_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double acct_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double fund_pay_sumamt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double fulamt_ownpay_amt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double hosp_part_amt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double inscp_scp_amt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string insutype { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double maf_pay { get; set; }
        /// <summary>
        /// 孔立昊
        /// </summary>
        public string psn_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double psn_part_amt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string clr_optins { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double pool_prop_selfpay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string psn_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double hifp_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double overlmt_selfpay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double preselfpay_amt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int age { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string clr_type { get; set; }
    }
    public class Setldetail
    {
        /// <summary>
        /// 
        /// </summary>
        public string fund_pay_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double fund_payamt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string setl_proc_info { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int crt_payb_lmt_amt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double inscp_scp_amt { get; set; }
        /// <summary>
        /// 城镇职工基本医疗保险个人账户基金
        /// </summary>
        public string fund_pay_type_name { get; set; }
    }
    /// <summary>
    /// 2103 药店结算撤销
    /// </summary>
    public class outputDrugstoreSettleRevoke
    {
        /// <summary>
        /// 
        /// </summary>
        public SetlinfoRevoke setlinfo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<Setldetail> setldetail { get; set; }
    }
    public class SetlinfoRevoke
    {
        /// <summary>
        /// 
        /// </summary>
        public string setl_time { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double cvlserv_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double hifdm_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double psn_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double hifmi_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double act_pay_dedc { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double balc { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string medins_setl_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double acct_mulaid_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double hifob_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double oth_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double medfee_sumamt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double hifes_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mdtrt_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double acct_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double fund_pay_sumamt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double fulamt_ownpay_amt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string setl_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double inscp_scp_amt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double maf_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int cash_payamt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string clr_optins { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double pool_prop_selfpay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double hifp_pay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double overlmt_selfpay { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public double preselfpay_amt { get; set; }
    }
    /// <summary>
    /// 2201门诊挂号出参output
    /// </summary>
    public class OutputOutpatientRregistration
    {
        /// <summary>
        /// 
        /// </summary>
        public OutpatientRregistration data { get; set; }
    }
    /// <summary>
    /// 2201门诊挂号出参data
    /// </summary>
    public class OutpatientRregistration
    {
        /// <summary>
        /// 
        /// </summary>
        public string psn_no { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string mdtrt_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string exp_content { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string ipt_otp_no { get; set; }
    }



    public class outputCuminfo
    {
        public List<Cuminfo> cuminfo { get; set; }
    }
    public class Cuminfo
    {
        /// <summary>
        /// 
        /// </summary>
        public string cum_type_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string year { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal cum { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string cum_ym { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string insutype { get; set; }
    }

    public class outputDataOpsp7202
    {
        public List<DataOpsp7202> data { get; set; }
    }
    public class DataOpsp7202
    {
        /// <summary>
        /// 
        /// </summary>
        public string auth_rxno { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string epc_token { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string expires_in { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string fixmedins_code { get; set; }
        /// <summary>
        /// 宁波市第一医院
        /// </summary>
        public string fixmedins_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string prsc_time { get; set; }
        /// <summary>
        /// 精神科
        /// </summary>
        public string dept_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string dise_codg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string dise_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string valid_end_time { get; set; }
    }

    public class outputDataOpsp7203
    {
        /// <summary>
        /// 
        /// </summary>
        public DataOpsp7203 data { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<RxDetlList> rxDetlList { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public RxOtpinfo rxOtpinfo { get; set; }
    }
    public class DataOpsp7203
    {
        /// <summary>
        /// 
        /// </summary>
        public string hi_rxno { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string fixmedins_code { get; set; }
        /// <summary>
        /// 宁波镇海一广成中医门诊部
        /// </summary>
        public string fixmedins_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string prsc_time { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string valid_end_time { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int? reptd_cnt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string rx_file { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string rx_trace_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string prsc_dept_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string rx_type_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string rx_type_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string long_rx_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string file_suffix { get; set; }
    }

    public class RxDetlList
    {
        /// <summary>
        /// 
        /// </summary>
        public string med_list_codg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string fixmedins_hilist_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string hosp_prep_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string rx_item_type_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string rx_item_type_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string tcmdrug_type_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string tcmdrug_type_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string tcmherb_foote { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string medn_type_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string medn_type_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string main_medc_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string urgt_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bas_medn_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string imp_drug_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string drug_prodname { get; set; }
        /// <summary>
        /// 阿莫西林片
        /// </summary>
        public string drug_genname { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string drug_dosform { get; set; }
        /// <summary>
        /// 按C16H19N3O5S计0.25g*24片/盒
        /// </summary>
        public string drug_spec { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string prdr_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal drug_cnt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string medc_way_codg { get; set; }
        /// <summary>
        /// 口服
        /// </summary>
        public string medc_way_dscr { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string medc_endtime { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string medc_begntime { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal medc_days { get; set; }
        /// <summary>
        /// 片
        /// </summary>
        public string drug_dosunt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal sin_doscnt { get; set; }
        /// <summary>
        /// 片
        /// </summary>
        public string sin_dosunt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string used_frqu_codg { get; set; }
        /// <summary>
        /// 每天一次
        /// </summary>
        public string used_frqu_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string drug_totlcnt { get; set; }
        /// <summary>
        /// 盒
        /// </summary>
        public string drug_totlnt_emp { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string own_expense_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string hi_nego_drug_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string refer_d_channel_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string bidding_drug_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string hosp_appr_flag { get; set; }
    }

    public class RxOtpinfo
    {
        /// <summary>
        /// 
        /// </summary>
        public string med_type { get; set; }
        /// <summary>
        /// 孔立昊
        /// </summary>
        public string patn_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal patn_age { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string patn_hgt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal? patn_wt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string gend { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public decimal? geso_val { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string nwb_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string nwb_age { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int? suck_prd_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string algs_his { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string dise_codg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string dise_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string otp_ipt_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string main_diag_code { get; set; }
        /// <summary>
        /// 麻风
        /// </summary>
        public string main_diag_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string dise_cond_dscr { get; set; }
    }

    public class OutputOpsp7000
    {
        public DataOutputOpsp7000 data { get; set; }
        public List<ListOutputOpsp7000> list { get; set; }
    }
    public class DataOutputOpsp7000
    {
        public int total {  get; set; }
        public int Size {  get; set; }  
    }
    public class ListOutputOpsp7000
    {
        public string med_list_codg { get; set; }
        public string nat_drug_no { get; set; }
        public string genname { get; set; }
        public string prodname { get; set; }
        public string reg_name { get; set; }
        public string list_type { get; set; }
        public string list_type_name { get; set; }
        public string spec_name { get; set; }
        public string prdr_name { get; set; }
        public string aprvno { get; set; }
        public string dosform_name { get; set; }
        public string min_pacunt { get; set; }
        public string min_pac_cnt { get; set; }
        public string min_prepunt { get; set; }
        public string poolarea_no { get; set; }
        public string poolarea_name { get; set; }
        public string dualchnl_flag { get; set; }
        public string begntime { get; set; }
        public string endtime { get; set; }

    }

    public class OutputOpsp7204
    {
        public DataOutputOpsp7204 data { get; set; }
    }
    public class DataOutputOpsp7204
    {
        public string flag { get; set; }
        public string rx_chk_biz_sn { get; set; }
        public string rx_info_verify_result { get; set; }
    }

    public class OutputQueryMedListMapByPage
    {
        public int recordCounts { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int pages { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<DataQueryMedListMapByPage> data { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string firstPage { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string lastPage { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int size { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int startRow { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int endRow { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int pageSize { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int pageNum { get; set; }
    }

    public class DataQueryMedListMapByPage
    {
        /// <summary>
        /// 
        /// </summary>
        public string insu_admdvs { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string med_list_codg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string poolarea_no { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string item_cont { get; set; }
        /// <summary>
        /// 阿莫西林胶囊
        /// </summary>
        public string medins_list_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string memo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string opter_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string rid { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string crte_optins_no { get; set; }
        /// <summary>
        /// 0.25g*50粒
        /// </summary>
        public string spec { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string begndate { get; set; }
        /// <summary>
        /// 国药准字H50020726
        /// </summary>
        public string aprvno { get; set; }
        /// <summary>
        /// 硬胶囊
        /// </summary>
        public string dosform { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string fixmedins_code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string crte_time { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string opter_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string optins_no { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string exct_cont { get; set; }
        /// <summary>
        /// 0.25g*50粒
        /// </summary>
        public string pacspec { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string opt_time { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string crter_name { get; set; }
        /// <summary>
        /// 盒
        /// </summary>
        public string prcunt { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string list_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string medins_list_codg { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string enddate { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string vali_flag { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string crter_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string updt_time { get; set; }
    }


    public class OutputStmtTotal 
    { 
        public DataStmtTotal stmtinfo { get; set; }
    }
    public class DataStmtTotal
    {
        public string setl_optins { get; set; }
        public string stmt_rslt_dscr { get; set; }
        public string stmt_rslt { get; set; }
    }

    public class OutputQueryPsnOpspReg
    {
        public List<FeedetailQueryPsnOpspReg>  feedetail { get; set; }
    }
    public class FeedetailQueryPsnOpspReg
    {
        /// <summary>
        /// 
        /// </summary>
        public string begndate { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string enddate { get; set; }
        /// <summary>
        /// 头和颈部血管治疗性超声
        /// </summary>
        public string opsp_dise_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string exp_content { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string opsp_dise_code { get; set; }
    }
    /// <summary>
    /// 文件上传返回信息
    /// </summary>
    public class OutputFileUpload
    {
        /// <summary>
        /// 
        /// </summary>
        public string filename { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string file_qury_no { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string dld_endtime { get; set; }
    }


    /// <summary>
    /// 3202对明细账返回信息
    /// </summary>
    public class OutputStmtDetail
    {
        /// <summary>
        /// 
        /// </summary>
        public OutputFileUpload fileinfo { get; set; }
    }
}
